package com.qf.zhijia.service.impl;

import com.qf.zhijia.mapper.KindMapper;
import com.qf.zhijia.pojo.Kind;
import com.qf.zhijia.pojo.Type;
import com.qf.zhijia.service.KindService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author Canaan
 * @version V1.0
 * @data 2020/09/05
 **/
@Service
public class KindServiceImpl implements KindService {

    @Autowired
    KindMapper kindMapper;

    /**
     * 展示二级类下所有商品，注意排序方式
     * @param kId
     * @return
     */
    @Override
    public List<Type> findAll(Integer kId) {
        List<Type> kindList = kindMapper.selectById(kId);
        System.out.println(kindList);
        return kindList;
    }
}
